import request from '@/utils/request'

// 修改供应商状态


export function changeProviderStatus (id, status) {
  return request({
    url: '/wms/provider/changeProviderStatus',
    method: 'get',
    params: {
      id, status
    }
  })
}
// 查询供应商信息列表
export function providerList () {
  return request({
    url: '/wms/provider/getInfoList',
    method: 'get'
  })
}

// 查询供应商列表
export function listProvider (query) {
  return request({
    url: '/wms/provider/list',
    method: 'get',
    params: query
  })
}

// 查询供应商详细
export function getProvider (id) {
  return request({
    url: '/wms/provider/' + id,
    method: 'get'
  })
}

// 新增供应商
export function addProvider (data) {
  return request({
    url: '/wms/provider',
    method: 'post',
    data: data
  })
}

// 修改供应商
export function updateProvider (data) {
  return request({
    url: '/wms/provider',
    method: 'put',
    data: data
  })
}

// 删除供应商
export function delProvider (id) {
  return request({
    url: '/wms/provider/' + id,
    method: 'delete'
  })
}